package io.renren.modules.hotel.controller;
import io.renren.common.utils.R;
import io.renren.modules.app.annotation.Login;
import io.renren.modules.app.dto.HotelQueryDto;
import io.renren.modules.hotel.config.PageRequestDto;
import io.renren.modules.hotel.dto.frequentlyaskedquestionEntityDto;
import io.renren.modules.hotel.entity.HotelMemberLevelDetailEntity;
import io.renren.modules.hotel.entity.frequentlyaskedquestionEntity;
import io.renren.modules.hotel.form.AddCollectForm;
import io.renren.modules.hotel.service.HotelQueryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.experimental.Accessors;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author 雪落
 * @date 2021/2/21 - 21:37
 */
@Api(value = "常见问题接口", tags = { "常见问题接口" })
@RestController
@RequestMapping("/hotel/query")
public class HotelQueryController {

    @Autowired
    HotelQueryService hotelQueryService;

    @ApiOperation("分页查询")
    @PostMapping("/list")
    @Login
    public String list(@RequestBody frequentlyaskedquestionEntityDto dto) {
        String selectbylist = hotelQueryService.selectbylist(dto);
        return selectbylist;
    }
   @ApiOperation("新增")
   @PostMapping("/add")
   @Login
   public String add(@RequestBody frequentlyaskedquestionEntity dto) {
       return hotelQueryService.add(dto);
   }
    @ApiOperation("删除")
    @PostMapping("/del")
    @Login
    public String del(@RequestBody HotelQueryDto dto) {
       return hotelQueryService.del(dto);
    }
    @ApiOperation("修改")
    @PostMapping("/upd")
    @Login
    public String upd(@RequestBody frequentlyaskedquestionEntity dto) {
        return hotelQueryService.upd(dto);
    }

}
